package com.fengmi.cms.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fengmi.entity.cms.CmsContent;
import com.fengmi.cms.mapper.CmsContentMapper;
import com.fengmi.cms.service.ICmsContentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 小马
 * @since 2021-10-12
 */
@Service
public class CmsContentServiceImpl extends ServiceImpl<CmsContentMapper, CmsContent> implements ICmsContentService {

    @Override
    public List<CmsContent> findContentByCatId(String CatId) {
        QueryWrapper<CmsContent> queryWrapper =  new QueryWrapper<>();
        queryWrapper.eq("category_id",CatId);
        return this.baseMapper.selectList(queryWrapper);
    }
}
